home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / linux / xfree86 / DOC / README.DGA < prev    next >
Encoding:
Text File  |  1998-01-07  |  4.1 KB  |  104 lines

  1.  
  2.                            XFree86-DGA Extension
  3.  
  4. The XFree86-DGA extension is an X server extension for allowing client
  5. programs direct access to the video frame buffer.
  6.  
  7. This is a brief description of the programming interface for the
  8. XFree86-DGA extension.  This describes version 1.0, which is the first
  9. official version.  The interface should remain compatible in future
  10. versions.  The functions described here are found in the library
  11. libXxf86dga.a.
  12.  
  13. Prototypes for these functions can be found in <X11/extensions/xf86dga.h>
  14.  
  15.   XF86DGAQueryVersion(Display *display, int *majorVersion, int *minorVersion)
  16.  
  17.      query the XFree86-DGA version
  18.  
  19.  
  20.   XF86DGAQueryExtension(Display *display, int *eventBase, int *errorBase)
  21.  
  22.      returns the eventBase and errorBase for the XFree86-DGA extension
  23.  
  24.  
  25.   XF86DGAQueryDirectVideo(Display *display, int screen, int *flags)
  26.  
  27.      Query the DirectVideo capabilities of the graphics device. Flags
  28.      are returned, which may be interpreted as follows (bit masks):
  29.  
  30.        XF86DGADirectPresent          DirectVideo support is present
  31.  
  32.  
  33.   XF86DGAGetVideo(Display *display, int screen, char **addr, int *width,
  34.                   int *bankSize, int *memSize);
  35.  
  36.      returns a pointer to the start of the video framebuffer (*addr),
  37.      the line width (*width), memory bank size (*bankSize) and total
  38.      memory size (*memSize).  Mapping the video framebuffer is a
  39.      privileged operation on most OSs (usually mmap of /dev/mem),
  40.      so a program using this must usually be setuid (or perhaps setgid)
  41.      at least up until the point the function is called.
  42.  
  43.  
  44.   XF86DGAGetViewPortSize(Display *display, int screen, int *width,
  45.                          int *height)
  46.  
  47.      Returns the width (*width) and height (*height) of the view port,
  48.      which is the part of the framebuffer that is visible on the monitor.
  49.  
  50.  
  51.   XF86DGADirectVideo(Display *display, int screen, int flags)
  52.  
  53.      enables/disables Direct Video mode.  When Direct Video mode is
  54.      enabled, the X server gives up control of the framebuffer to the
  55.      client.  When flags is zero, Direct Video mode is disabled.  flags
  56.      may be a bit-wise combination of the following:
  57.  
  58.        XF86DGADirectGraphics          enable Direct Video mode
  59.        XF86DGADirectMouse             enable reporting of pointer movement
  60.                                       as relative motion
  61.        XF86DGADirectKeyb              enable direct reporting of keyboard
  62.                                       events
  63.  
  64.  
  65.   XF86DGASetVidPage(Display *display, int screen, int page)
  66.  
  67.      Set the framebuffer page.  This is only required for hardware which
  68.      has a banked memory layout (ie, bankSize < memSize).
  69.  
  70.  
  71.   XF86DGASetViewPort(Display *display, int screen, int x, int y)
  72.  
  73.      Set the coordinates of the upper-left corner of the view port to (x,y).
  74.  
  75.  
  76.   Bool XF86DGAViewPortChanged(Display *display, int screen, int n)
  77.  
  78.      Checks whether a previous SetViewPort command has been performed
  79.      by the hardware, that is, whether a vertical retrace has occurred
  80.      since a previous SetViewPort. This can (must, in fact) be used
  81.      with page-flipping; you can start writing to the next page only when
  82.      this function returns TRUE. For some devices this will be the
  83.      case immediately after SetViewPort, however this may be changed in
  84.      in the future. The number of pages used is specified with n; it
  85.      should be 2 for simple page flipping. If n is greater than two
  86.      (triple or multi-buffering), the function checks whether the
  87.      (n - 2)-before-last SetViewPort has been performed.
  88.  
  89.  
  90.   XF86DGAInstallColormap(Display *display, int screen, Colormap cmap)
  91.  
  92.      Set the current colormap of the display to cmap. XF86DGADirectGraphics
  93.      must be active on the display/screen before calling
  94.      XF86DGAInstallColormap or it will produce the error XF86DGAScreenNotActive
  95.      or XF86DGADirectNotActivated.
  96.  
  97.  
  98.   int XF86DGAForkApp(int screen)
  99.  
  100.      Fork the app, parent process hangs around to return non DGA mode should
  101.      the child exit for any reason. Returns 0, or error returned by fork().
  102.  
  103. $XFree86: xc/programs/Xserver/hw/xfree86/doc/README.DGA,v 3.5 1996/10/18 15:03:04 dawes Exp $
  104.